#ifndef STATUS_CODE_H
#define STATUS_CODE_H

#include "error_status.h"

enum HTTP_STATUS {
	STATUS_CONTINUE = 100,
	STATUS_SWITCHING_PROTOCOLS,
	STATUS_OK = 200,
	STATUS_CREATED,
	STATUS_ACCEPTED,
	STATUS_NON_AUTHORITATIVE_INFORMATION,
	STATUS_NO_CONTENT,
	STATUS_RESET_CONTENT,
	STATUS_PARTIAL_CONTENT,
	STATUS_MULTIPLE_CHOICES = 300,
	STATUS_MOVED_PERMANENTLY,
	STATUS_MOVED_TEMPORARILY,
	STATUS_SEE_OTHER,
	STATUS_NOT_MODIFIED,
	STATUS_USE_PROXY,
	STATUS_BAD_REQUEST = 400,
	STATUS_UNAUTHORIZED,
	STATUS_PAYMENT_REQUIRED,
	STATUS_FORBIDDEN,
	STATUS_NOT_FOUND,
	STATUS_METHOD_NOT_ALLOWED,
	STATUS_NOT_ACCEPTABLE,
	STATUS_PROXY_AUTHENTICATION_REQUIRED,
	STATUS_REQUEST_TIMEOUT,
	STATUS_CONFLICT,
	STATUS_GONE,
	STATUS_LENGTH_REQUIRED,
	STATUS_PRECONDITION_FAILED,
	STATUS_REQUEST_ENTITY_TOO_LARGE,
	STATUS_REQUEST_URI_TOO_LARGE,
	STATUS_UNSUPPORTED_MEDIA_TYPE,
	STATUS_INTERNAL_SERVER_ERROR = 500,
	STATUS_NOT_IMPLEMENTED,
	STATUS_BAD_GATEWAY,
	STATUS_SERVICE_UNAVAILABLE,
	STATUS_GATEWAY_TIMEOUT,
	STATUS_HTTP_VERSION_NOT_SUPPORTED,
	N_STATUS
};

enum HTTP_VERSION {
	HTTP_1_0,
	HTTP_1_1,
	HTTP_2_0,
	N_HTTP
};

/*
 * build_status_code
 * @buf - buf will be allocated with htx_alloc_buf_status_code
 *
 */
enum STATUS_ERROR htx_build_status_code (char *buf, enum HTTP_STATUS status, enum HTTP_VERSION http_v);

char *htx_alloc_buf_status_code ();
#endif
